package de.fhffm.scs.simulator.scheduler;

import java.util.concurrent.TimeUnit;

public interface Scheduler {

	/**
	 * @return The current timestamp in milliseconds
	 */
	long getCurrentTimestamp();

	/**
	 * Lets the calling thread sleep a defined time according to a specified
	 * {@link TimeUnit}
	 * 
	 * @param unit
	 *            The unit e.q. Seconds, Minutes, Hours ...
	 * @param value
	 *            The value
	 */

	/**
	 * Lets the calling thread sleep a defined time according to a specified
	 * {@link TimeUnit}
	 * 
	 * @param unit
	 *            The unit e.q. Seconds, Minutes, Hours ...
	 * @param value
	 *            The value
	 * @throws InterruptedException
	 *             If the sleep gets interrupted in between
	 * @throws IllegalArgumentException
	 *             If the {@link TimeUnit} is not supported
	 */
	void sleep(TimeUnit unit, long value) throws InterruptedException,
			IllegalArgumentException;

}
